﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sora.Data.Kernel.Caching;

namespace Sora.HelpSystem.Utils
{
    public class SearchCache : ArrayCache<string, SearchCacheItem>
    {
        public SearchCache(int cacheSize)
            : base(cacheSize)
        {
            InitializeCache();
        }

        public void Reset()
        {
            foreach (var item in CacheItems)
            {
                item.valid = false;
                item.SearchResult = null;
            }
        }

        protected override SearchCacheItem CreateCacheItem()
        {
            var res = new SearchCacheItem();

            return res;
        }
    }
}
